package com.maywide.jdp.system.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Directory;

/**
 * 字典管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface DirectoryService extends LockedService {
	/**
	 * 新增数据字典
	 * 
	 * @param role
	 *            数据字典对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Parameter 新增后的对象
	 */
	public Directory insert(Directory role, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改数据字典
	 * 
	 * @param role
	 *            数据字典对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Directory 修改后的对象
	 * @throws Exception
	 *             应用异常
	 */
	public Directory update(Directory role, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 读取数据字典
	 * 
	 * @param id
	 *            数据字典ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Directory 读取的数据字典对象
	 * @throws Exception
	 *             应用异常
	 */
	public Directory load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;
	

	/**
	 * 删除数据字典
	 * 
	 * @param id
	 *            数据字典ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return 
	 * @throws Exception
	 *             应用异常
	 */
	public void remove(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;
}
